﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using WarehouseManagement.BusinessLogic.DTO;
using WarehouseManagement.DataAccess;

namespace WarehouseManagement.BusinessLogic.DTOConverter
{
    public class SupplierConverter
    {
        public static SupplierDTO Convert(Supplier entity)
        {
            return new SupplierDTO()
            {
                Address = entity.Address,
                BankAccount = entity.BankAccount,
                BankName = entity.BankName,
                Email = entity.Email,
                Id = entity.Id,
                MobilePhone = entity.MobilePhone,
                SupplierName = entity.SupplierName

            };
        }

        public static Supplier Convert(SupplierDTO dto)
        {
            return new Supplier()
            {
                Address = dto.Address,
                BankAccount = dto.BankAccount,
                BankName = dto.BankName,
                Email = dto.Email,
                Id = dto.Id,
                MobilePhone = dto.MobilePhone,
                SupplierName = dto.SupplierName

            };
        }
    }
}
